#pragma once

#include "Binding/BoundExpression.hpp"
#include "Binding/BoundNode.hpp"
#include "Binding/BoundStatement.hpp"
#include "Symbols/VariableSymbol.hpp"

class BoundForStatement : public BoundStatement
{
public:
    SharedVariableSymbol  Variable;
    SharedBoundExpression LowerBound;
    SharedBoundExpression UpperBound;
    SharedBoundStatement  Body;

public:
    BoundForStatement(SharedVariableSymbol variable, SharedBoundExpression lowerBound, SharedBoundExpression upperBound, SharedBoundStatement body)
        : BoundStatement(BoundNodeKind::ForStatement), Variable(variable), LowerBound(lowerBound), UpperBound(upperBound), Body(body)
    {
    }

    ~BoundForStatement() = default;

public:
    virtual std::vector<SharedBoundNode>                      GetChildren() override { return {this->LowerBound, this->UpperBound, this->Body}; }
    virtual std::vector<std::tuple<std::string, std::string>> GetProperties() override { return {{"Variable", this->Variable->GetName()}}; }
};